Skip to content

chore: Restore full relative include visibility in WWVegas libraries - #3032

Merged
xezon merged 5 commits into
TheSuperHackers:mainfrom
CryoTheRenegade:fix/wwvegas-component-includes
Aug 1, 2026
Merged

chore: Restore full relative include visibility in WWVegas libraries#3032
xezon merged 5 commits into
TheSuperHackers:mainfrom
CryoTheRenegade:fix/wwvegas-component-includes

Conversation

@CryoTheRenegade

@CryoTheRenegade CryoTheRenegade commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • Let corei_ww3d2 carry the Core component directory through the existing private links to g_ww3d2 and z_ww3d2; each product target prepends only its own directory.
  • Keep qualified WW3D2/... includes on header edges that cross the Core/product partition, while target-internal same-component includes remain bare.
  • Remove the dedicated include-only targets without exposing source-carrying INTERFACE_SOURCES or giving component roots to WWAudio and other consumers.

Context

This follows up on #2881 and the WW3D2 unification discussion in #3012. It treats the Core and game-specific halves of WW3D2 as one logical component without restoring broad WWVegas component search paths.

Verification

  • Focused ClangCL Release builds for WW3D2, WWAudio, GameEngine, and GameEngineDevice in Generals and Zero Hour.
  • Combined VC6-compatible Generals and Zero Hour build, including tools and extras.
  • Generated include-order and header-boundary checks for product-before-Core ordering and absence of component-root leakage.

Expose Core and game-specific WW3D2 directories through target usage requirements, then remove redundant same-component include qualifiers.
Avoid restoring a WWLib component include directory for a library that is not split across source trees.
Comment thread GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/CMakeLists.txt Outdated

@bobtista bobtista left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'd squash some of the commits. This makes sense during unification, but maybe mark it as temporary so component-local include paths do not become the general WWVegas convention? eg add a note on corei_ww3d2_include that the two-folder overlay exists because WW3D2 is split across Core and the game halves, and isn't a general WWVegas convention

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake setup looks complicated. Only g_ww3d2 and z_ww3d2 need to see the core include folder right? Can pass it from corei_ww3d2 directly?

Comment thread Generals/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt
Comment thread Generals/Code/CMakeLists.txt Outdated
@xezon xezon changed the title fix(wwvegas): Restore component include visibility chore: Restore full relative include visibility in WWVegas libraries Aug 1, 2026

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@xezon
xezon marked this pull request as ready for review August 1, 2026 14:36
@greptile-apps

greptile-apps Bot commented Aug 1, 2026

Copy link
Copy Markdown

Greptile Summary

The PR restructures WW3D2 include visibility so each product target searches its own component directory before the shared Core directory, while downstream consumers retain qualified access through the WWVegas parent directory.

  • Adds the Core WW3D2 source directory to corei_ww3d2 and product directories privately to g_ww3d2 and z_ww3d2.
  • Converts same-component source includes to bare sibling includes while preserving qualified cross-component access.
  • Removes dedicated include-only targets without propagating component roots to unrelated consumers.

Confidence Score: 5/5

The PR appears safe to merge because the revised private include ordering preserves downstream qualified includes without exposing WW3D2 component roots.

Product targets receive both their local and shared Core WW3D2 directories during compilation, while consumers continue resolving qualified headers through the propagated WWVegas parent directory.

Important Files Changed

Filename Overview
Core/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt Exposes the Core WW3D2 component directory through its interface target so product WW3D2 compilation can resolve shared bare headers.
Generals/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt Prepends the Generals WW3D2 directory privately and updates its precompiled-header spelling without leaking the component root.
GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt Mirrors the private product-before-Core include arrangement for Zero Hour.
Core/Libraries/Source/WWVegas/WWDownload/Download.h Uses quoted sibling-header includes that remain resolvable relative to the including header’s directory.
Core/Libraries/Source/WWVegas/WWLib/DbgHelpLoader.h Converts same-directory WWLib includes to quoted sibling includes without changing behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  G["Product WW3D2 target"] -->|PRIVATE: product directory first| P["Product WW3D2 headers"]
  G -->|PRIVATE link| C["corei_ww3d2"]
  C -->|INTERFACE to product target| H["Core WW3D2 headers"]
  V["g_wwvegas / z_wwvegas"] -->|INTERFACE: WWVegas parent| D["Downstream consumers"]
  D -->|qualified WW3D2/header.h| P
Loading

Reviews (1): Last reviewed commit: "fix(wwvegas): Keep WW3D2 overlay private" | Re-trigger Greptile

@xezon
xezon merged commit 82a4275 into TheSuperHackers:main Aug 1, 2026
17 checks passed
@CryoTheRenegade
CryoTheRenegade deleted the fix/wwvegas-component-includes branch August 1, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants